import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'main',
    component: () => import('../views/Main.vue'),
    children: [
      { 
        path: 'home',
        alias: '',
        name: 'Home',
        component: () => import('../views/Home.vue')
      },
      {
        path: 'film',
        name: 'Film',
        component: () => import('../views/Film.vue')
      },
      {
        path: 'my',
        name: 'My',
        component: () => import('../views/My.vue')
      }
    ]
  },
  {
    path:'/jingdian',
    name:'Jingdian',
    component: () => import('../views/Jingdian.vue')
  },
  {
    path:'/city',
    name:'City',
    component: () => import('../views/City.vue')
  },
  {
    path:'/details/:id/:type',
    name:'Details',
    component: () => import('../views/Details.vue')
  },
  {
    path:'/adeio/:url/:title/:time',
    name:'Adeio',
    component: () => import('../views/Adeio.vue')
  },
  {
    path:'/shop/:id',
    name:'Shop',
    component: () => import('../views/Shop.vue')
  },
  {
    path:'/cinema/:id/:cityid/:addr/:title/:time',
    name:'Cinema',
    component: () => import('../views/Cinema.vue')
  },
  {
    path:'/sripe',
    name:'Sripe',
    component: () => import('../views/Sripe.vue')
  },
  {
    path:'/isripe/:value',
    name:'Isripe',
    component: () => import('../views/Isripe.vue')
  },
  {
    path:'/xuanwei/:title/:dt/:tm/:lang/:price/:th',
    name:'XuanWei',
    component: () => import('../views/XuanWei.vue')
  },
  {
    path:'/login',
    name:'Login',
    component: () => import('../views/Login.vue')
  },
  {
    path:'/xiang',
    name:'Xiang',
    component: () => import('../views/Xiang.vue')
  },
  {
    path:'/kan',
    name:'Kan',
    component: () => import('../views/Kan.vue')
  },
  {
    path:'/piao',
    name:'Piao',
    component: () => import('../views/Piao.vue')
  },
  {
    path:'/account',
    name:'Account',
    component: () => import('../views/Account.vue')
  },
  {
    path:'/inregardto',
    name:'inRegardTo',
    component: () => import('../views/inRegardTo.vue')
  }
]

const router = new VueRouter({
  mode: 'hash',
  routes
})

export default router
